<template>
  <div class="BulletBoxMine-container">
    <div class="attribute-pan">
      <div class="pan-nav">
        <div class="nav-title">{{ this.MineType }}</div>
        <div class="nav-info" @click="handleDetail">查看详情</div>
        <div class="nav-close" @click="closeBullet"></div>
      </div>
      <div class="pan-cont">
        <div class="cont-infoMsg">
          <jing-gong-attribute
            v-if="MineType === '井工煤矿生产要素信息表'"
          ></jing-gong-attribute>
          <lou-tian-attribute
            v-if="MineType === '露天煤矿生产要素信息表'"
          ></lou-tian-attribute>
          <wei-kuang-attribute
            v-if="MineType === '尾矿库基本情况信息表'"
          ></wei-kuang-attribute>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import JingGongAttribute from "./InfoAttribute/JingGongAttribute.vue";
import LouTianAttribute from "./InfoAttribute/LouTianAttribute.vue";
import WeiKuangAttribute from "./InfoAttribute/WeiKuangAttribute.vue";
export default {
  components: {
    JingGongAttribute,
    LouTianAttribute,
    WeiKuangAttribute,
  },
  props: {
    dataOutput: Array,
  },
  data() {
    return {
      MineType: "",
      AttributeTitle: "",
      MineData: {},
    };
  },
  watch: {
    dataOutput() {
      this.handleInitList();
    },
  },
  methods: {
    handleInitList() {
      this.MineData = this.dataOutput[0];
      if (this.MineData.values_.ZLSX === "已治理") {
        this.MineType = "井工煤矿生产要素信息表";
      } else if (this.MineData.values_.ZLSX === "治理中") {
        this.MineType = "尾矿库基本情况信息表";
      } else {
        this.MineType = "露天煤矿生产要素信息表";
      }
    },
    closeBullet() {
      this.$emit("closeBullet");
    },
    // TODO
    handleDetail() {
      // console.log("你点击了查看详情！！！");
      this.$router.push("/pondList");
    },
  },
};
</script>

<style lang="scss" scoped>
.BulletBoxMine-container {
  user-select:none;
  width: 450px;
  height: 267px;
  background-color: rgba(8, 16, 42, 0.7);

  .attribute-pan {
    width: 100%;
    height: 100%;
    .pan-nav {
      width: 100%;
      height: 28px;
      position: relative;
      top: 25px;
      background: url("../../../../../assets/img/BullectBox/弹窗背景条.png")
        no-repeat;
      background-size: 100% 100%;
      color: #f6f9fe;
      display: flex;
      direction: row;
      .nav-title {
        width: 280px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        // border: 1px solid red;

        font-family: "AlibabaPuHuiTi-2-105-Heavy";
        font-size: 22px;
        font-weight: normal;
        font-style: italic;
        font-stretch: normal;
        letter-spacing: 0px;
        margin-left: 29px;
        margin-top: -16px;
      }
      .nav-info {
        margin-left: 10px;
        margin-top: -12px;
        font-family: "AlibabaPuHuiTi-2-105-Heavy";
        font-size: 18px;
        font-weight: normal;
        font-style: italic;
        font-stretch: normal;
        letter-spacing: 0px;
        color: #f6f9fe;
        cursor: pointer;
      }
      .nav-close {
        margin-left: 10px;
        margin-top: -16px;
        width: 33px;
        height: 33px;
        background: url("../../../../../assets/img/BullectBox/弹窗关闭.png")
          no-repeat;
        background-size: 100% 100%;
        cursor: pointer;
      }
    }
    .pan-cont {
      width: 100%;
      height: calc(100% - 28px);
      justify-content: space-around;
      .cont-infoMsg {
        width: 410px;
        height: 188px;
        margin-left: 21px;
        margin-top: 35px;
      }
    }
  }
}
</style>
